﻿@{
    ViewBag.Title = "Trang chủ";
    var currentRole = Roles.GetRolesForUser(User.Identity.Name);
}
<style type="text/css">
    .divinhome
    {
        border:1px solid #d4d4d4;
        border-radius:5px;
        margin:15px;
        width:368px;
        float:left;
        padding:15px 0px 15px 0px;
    }
        .divinhome a, .divinhome a:link, .divinhome a:visited, .divinhome a:active
        {
            text-decoration:none;
            color:white;
            font-weight:bold;
            font-size:20pt;
        }
        .divinhome a:hover
        {
            text-decoration:underline;
        }
    #sanpham
    {
        background-color:#5BC0DE;
    }
    #hoadonchuyenkho
    {
        background-color:#F0AD4E;
    }
    #hoadonnhapkho
    {
        background-color:#5CB85C;
    }
    #hoadonxuatkho
    {
        background-color:#D9534F;
    }
</style>
<div style="width:800px; margin:auto; text-align:center;">
    <div class="divinhome" id="sanpham">
        <a href="/SanPham/"><img src="~/Images/Product.png" border="0" /><br />Sản phẩm</a>
    </div>
    @if (currentRole.Contains("Administrator") || currentRole.Contains("Staff"))
    {
        <div class="divinhome" id="hoadonnhapkho">
            <a href="/SanPham/"><img src="~/Images/Input.png" border="0" /><br />Hóa đơn nhập kho</a>
        </div>
    }
    @if (currentRole.Contains("Administrator") || currentRole.Contains("StaffXuatKho"))
    {
        <div class="divinhome" id="hoadonxuatkho">
            <a href="/XuatKho/IndexGrid"><img src="~/Images/Output.png" border="0" /><br />Hóa đơn xuất kho</a>
        </div>
    }
    @if (currentRole.Contains("Administrator"))
    {
        <div class="divinhome" id="hoadonchuyenkho">
            <a href="/ChuyenKho/"><img src="~/Images/Swap.png" border="0" /><br />Hóa đơn chuyển kho</a>
        </div>
    }
</div>
